﻿/**
 * @file SEABeamWapper.h
 * @brief SEA梁 相关的python接口
 * @author wangning (2185896382@qq.com)
 * @date 2024-11-25
 */
#ifndef _PY_SEA_BEAM_WAPPER_H___
#define _PY_SEA_BEAM_WAPPER_H___

#include <QString>
#include <QObject>
#include "PythonInterfaceAPI.h"
#include "FITK_Component/FITKAcousticsModel/PyFITKSEABeam.h"


class SEABeam : public Acoustics::PyFITKSEABeam
{
public:
    explicit SEABeam(const QString& name);
    explicit SEABeam();
    virtual ~SEABeam() = default;

};

/**
 * @brief SEA梁相关PYTHON接口装饰
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-03
 */
class  PythonInterfaceAPI SEABeamWapper : public QObject
{
    Q_OBJECT
public slots:
    SEABeam* new_SEABeam();

    void delete_SEABeam(SEABeam* obj);
    /**
     * @brief 在Python解释器中通过名称获取对象
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-03
     */
    SEABeam* static_SEABeam_GetSEABeam(const QString& name);
    /**
     * @brief 添加点,自动设置类型
     * @param[i]  pointId：点的ID
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    void addPoint(SEABeam* obj, int pointId);
    /**
     * @brief 创建梁
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    void createBeam(SEABeam* obj);
    /**
     * @brief 获取名称
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    QString getName(SEABeam* obj);
    /**
     * @brief 设置名称
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    void setName(SEABeam* obj, const QString& name);
    /**
     * @brief 设置物理属性
     * @param[i]  pro：物理属性
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    void setPhysicalProp(SEABeam* obj, const QString& pro);
    /**
     * @brief 设置阻尼
     * @param[i]  type： 设置种类 1:Flexure X ,2:Flexure X ,3:Extension Z ,4:Torsion ZZ
     * @param[i]  damping：阻尼
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    void setDamping(SEABeam* obj, int type, const QString& damping);
    /**
     * @brief 设置是否启用  FlexureX， FlexureY，ExtensionZ，TorsionZZ  在SEA的解决方案
              设置是否启用  FlexureX， FlexureY，ExtensionZ，TorsionZZ  的模态密度及启用类型
     * @param[i]  type：波的类型 1:FlexureX 2:FlexureY 3:ExtensionZ 4:TorsionZZ
     * @param[i]  isSolution：是否启用波在SEA的解决方案
     * @param[i]  isModalDensity：是否启用波的模态密度
     * @param[i]  modalDensity：模态密度类型
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    void setSEAMatrixSolution_ModalDensity(SEABeam* obj, int type, bool isSolution, bool isModalDensity, const QString& modalDensity = QString());
    /**
     * @brief 获取周长和横截面周长和横截面面积
     * @author wangning (2185896382@qq.com)
     * @date 2024-11-25
     */
    QString getGeometryProp(SEABeam* obj);

private:
    void initShell(SEABeam* beam);
};

#endif

